package org.wyl.xiachufang.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wyl.xiachufang.spider.FoodSpiderRunner;

@RestController
@RequestMapping("/")
public class FoodController {

    @Autowired
    private FoodSpiderRunner foodSpiderRunner;

    @GetMapping("/crawler")
    public String doCrawler(){
        foodSpiderRunner.start();
        return "OK";
    }
}